import { Directive, DirectiveBinding } from 'vue'
const preventReClick: Directive = {
  mounted(el: HTMLElement, binding: DirectiveBinding) {
  el.addEventListener('click', () => {
    if (!el.disabled) {
    el.disabled = true;
    setTimeout(() => {
      el.disabled = false;
    }, binding.value || 1000);
    }
  });
  }
};
export default preventReClick
